﻿// Decompiled with JetBrains decompiler
// Type: StoryMode.TrainingField
// Assembly: StoryMode, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 11BAE65F-6C15-4628-A9C6-1B968588CDA1
// Assembly location: D:\steam\steamapps\common\Mount & Blade II Bannerlord\Modules\StoryMode\bin\Win64_Shipping_Client\StoryMode.dll

using System.Collections.Generic;
using System.Xml;
using TaleWorlds.CampaignSystem.Settlements;
using TaleWorlds.Core;
using TaleWorlds.ObjectSystem;

#nullable disable
namespace StoryMode
{
  public class TrainingField : SettlementComponent
  {
    internal static void AutoGeneratedStaticCollectObjectsTrainingField(
      object o,
      List<object> collectedObjects)
    {
      ((MBObjectBase) o).AutoGeneratedInstanceCollectObjects(collectedObjects);
    }

    protected override void AutoGeneratedInstanceCollectObjects(List<object> collectedObjects)
    {
      base.AutoGeneratedInstanceCollectObjects(collectedObjects);
    }

    public override void Deserialize(MBObjectManager objectManager, XmlNode node)
    {
      base.Deserialize(objectManager, node);
      if (node.Attributes["background_crop_position"] != null)
        this.BackgroundCropPosition = float.Parse(node.Attributes["background_crop_position"].Value);
      if (node.Attributes["background_mesh"] != null)
        this.BackgroundMeshName = node.Attributes["background_mesh"].Value;
      if (node.Attributes["wait_mesh"] == null)
        return;
      this.WaitMeshName = node.Attributes["wait_mesh"].Value;
    }

    protected override void OnInventoryUpdated(ItemRosterElement item, int count)
    {
    }
  }
}
